package com.mrx.commons.gateway.service;

import com.mrx.commons.gateway.handler.DispatcherHandlerChain;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Mr.X
 * @since 2024/6/2 上午9:29
 */
@Service
public class GatewayDispatchService {

    @Resource
    private DispatcherHandlerChain dispatcherHandlerChain;

    public void dispatchRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        dispatcherHandlerChain.dispatch(request, response);
    }

}
